package com.kun.companion.core.persistence.strategy;

/**
 * TODO
 *
 * @author gzc
 * @since 2025/2/2 4:50
 **/
public class TxtSerializationStrategy<D> implements SerializationStrategy<D> {
    @Override
    public String getFileTypeName() {
        return "txt";
    }

    @Override
    public String serialize(D data) {
        return data.toString();
    }

    @Override
    public D deserialize(String dataStr) {
        return (D) dataStr;
    }
}
